#include <cassert>
#include <string>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <sstream>
#include "json11.hpp"
#include<regex>
#include <fstream>
#include <iostream>
using namespace json11;
using namespace std;
using std::string;
string readjs(string FilePath) {

    //[shape][0][point]

    std::string acc;

    std::ifstream t(FilePath);
    std::string str((std::istreambuf_iterator<char>(t)),
        std::istreambuf_iterator<char>());

    string err;
    const auto json = Json::parse(str, err);
    //vector<string> b;
    //for (int c = 0; c < 20; c = c + 1) {
        std::string a = json["shapes"][0]["points"].dump();
       // b.push_back(a);
   //}

    return a;

}
vector<float>pipei(string dd) {
    std::regex reg1("-?(([1-9]\\d*\\.\\d*)|(0\\.\\d*[1-9]\\d*))");
    smatch results;//用于保存成功匹配的相关信息
    vector<float> b;
    const std::sregex_iterator end1;
    for (std::sregex_iterator iter(std::begin(dd),std::end(dd), reg1); iter != end1; ++iter)
    {
        b.push_back(atof(iter->str().c_str()));
    }
    return b;

}

